package qj.pooling;

import qj.concurrent.Workable;

/**
 * Created by QuanLA
 * Date: Apr 6, 2006
 * Time: 2:45:05 PM
 */
public class PoolFactory {
    public ObjectPool buildPool(PoolManagable poolManager) {
        return new SimpleObjectPool(poolManager);
    }
    public ObjectPool buildPool(PoolManagable poolManager, Workable poolCleaner) {
        SimpleObjectPool simpleObjectPool = new SimpleObjectPool(poolManager);
        simpleObjectPool.setPoolCleaner(poolCleaner);
        return simpleObjectPool;
    }
}
